Syntax Directed Translation with LR Parsing
نویسنده
چکیده
Abstrac t . A simple extension of the usual LR parser construction is made in order to build a translator. The LR parsing algorithm is extended by a facility to do output operations within the action shift and reduce. A class of translation grammars, called R-translation grammars, is introduced as an extension of the class of postfix translation grammars. Transformations called shaking-down and postponing of output symbols are used for transformation of some non-R-translation to R-translation ones.
منابع مشابه
LLLR Parsing: a Combination of LL and LR Parsing
A new parsing method called LLLR parsing is defined and a method for producing LLLR parsers is described. An LLLR parser uses an LL parser as its backbone and parses as much of its input string using LL parsing as possible. To resolve LL conflicts it triggers small embedded LR parsers. An embedded LR parser starts parsing the remaining input and once the LL conflict is resolved, the LR parser p...
متن کاملOn the Relationship Between the LL(k) and LR(k) Grammars
* The preparation of this paper was partially supported by a Natural Sciences and Engineering Research Council of Canada Grant No. A-7700 during the author’s stay at Mcc Master University, Hamilton, Ontario. remarked that a careful and clear proof of this inclusion result would make a suitable master’s thesis. We give a short survey of the relevant literature on this inclusion problem. From the...
متن کاملVisual Language Editors Based on Lr Parsing Techniques
Visual language editors should provide a user-friendly environment where users are supported in an effective way in the construction of visual sentences. In this paper, we propose an approach for the construction of syntax-directed visual language editors by integrating incremental parsers into freehand editors. The approach combines the LR-based techniques for parsing visual languages with the...
متن کاملA Proper Treatmemt Of Syntax And Semantics In Machine Translation
A proper treatment of syntax and semantics in machine translation is introduced and discussed from the empirical viewpoint. For EnglishJapanese machine translation, the syntax directed approach is effective where the Heuristic Parsing Model (HPM) and the Syntactic Role System play important roles. For Japanese-English translation, the semantics directed approach is powerful where the Conceptual...
متن کاملSynchronous Context-Free Grammars and Optimal Linear Parsing Strategies
Synchronous Context-Free Grammars (SCFGs), also known as syntax-directed translation schemata [AU69, AU72], are unlike context-free grammars in that they do not have a binary normal form. In general, parsing with SCFGs takes space and time polynomial in the length of the input strings, but with the degree of the polynomial depending on the permutations of the SCFG rules. We consider linear pars...
متن کامل